package ua.kpi.apolonov.tester;

import ua.kpi.apolonov.IO.InputOutput;
import ua.kpi.apolonov.factories.FileQuestionsFactory;
import ua.kpi.apolonov.factories.QuestionsFactory;

/**
 * @version 4.0 18.02.2013
 * @author Yegor Apolonov
 */

public class TestClass {
    
    public static void main(String[] args) {
    	QuestionsFactory factory = new FileQuestionsFactory();
    	Examinant examinator = new Examinant(factory.retrieveQuestions());
    	examinator.performTest();
        float result = examinator.getResult();
        float maxScore = examinator.getMaxScore();
        InputOutput stream = new InputOutput(System.in, System.out);
        stream.outResultToDislpay(result, maxScore);
        stream.outResultToFile(examinator.getUserName(), result, maxScore);
    }
}